package com.repeat.member;

import com.api.openfeign.client.UserClient;
import io.jsonwebtoken.SignatureAlgorithm;
import io.jsonwebtoken.io.Encoders;
import io.jsonwebtoken.security.Keys;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;

import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;

import javax.crypto.SecretKey;
//@EntityScan("com.shop") // 扫描实体类所在包
//@ComponentScan(basePackages = {
//        "com.repeat.member", // 包含UserServiceImpl所在的包
//        "com.shop.servlet"   // 扫描security-servlet模块的组件
//})
@SpringBootApplication
@EnableFeignClients(clients = {UserClient.class})
@EnableJpaAuditing
public class MemberApplication {
    public static void main(String[] args) {
        SpringApplication.run(MemberApplication.class, args);
        //生成一个密钥
//        SecretKey key = Keys.secretKeyFor(SignatureAlgorithm.HS512);
//        String secretString = Encoders.BASE64.encode(key.getEncoded());
//        System.out.println("Generated secret key: " + secretString);
    }

}
